package com.gitee.empty_null.orm.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.activerecord.Model;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * @author xuhainan
 * @date 2024/1/22 14:35
 * @region hefei
 */
@Table("oauth2_authorization")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data(staticConstructor = "create")
public class AuthorizationEntity extends Model<AuthorizationEntity> implements BaseEntity {

    @Serial
    private static final long serialVersionUID = 1249657911879118768L;

    @Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
    private String id;

    private String registeredClientId;

    private String principalName;

    private String authorizationGrantType;

    private String authorizedScopes;

    private String attributes;

    private String state;

    private String authorizationCodeValue;

    private LocalDateTime authorizationCodeIssuedAt;

    private LocalDateTime authorizationCodeExpiresAt;

    private String authorizationCodeMetadata;

    private String accessTokenValue;

    private LocalDateTime accessTokenIssuedAt;

    private LocalDateTime accessTokenExpiresAt;

    private String accessTokenMetadata;

    private String accessTokenType;

    private String accessTokenScopes;

    private String oidcIdTokenValue;

    private LocalDateTime oidcIdTokenIssuedAt;

    private LocalDateTime oidcIdTokenExpiresAt;

    private String oidcIdTokenMetadata;

    private String oidcIdTokenClaims;

    private String refreshTokenValue;

    private LocalDateTime refreshTokenIssuedAt;

    private LocalDateTime refreshTokenExpiresAt;

    private String refreshTokenMetadata;

    private String userCodeValue;


    private LocalDateTime userCodeIssuedAt;


    private LocalDateTime userCodeExpiresAt;


    private String userCodeMetadata;

    private String deviceCodeValue;

    private LocalDateTime deviceCodeIssuedAt;

    private LocalDateTime deviceCodeExpiresAt;

    private String deviceCodeMetadata;


}
